package com.neulogistics.contrib.procuredcenter.api.application.converter;

import com.neulogistics.contrib.procuredcenter.api.application.viewmodel.GoodsSetViewModel;
import com.neulogistics.contrib.procuredcenter.infrastructure.persistence.orm.po.GoodsSetPO;
import org.springframework.beans.BeanUtils;

public class GoodsSetPOVMConverter {
    public static GoodsSetViewModel POToVM(GoodsSetPO goodsSetPO){
        if (goodsSetPO == null)
            return null;

        GoodsSetViewModel goodsSetViewModel = new GoodsSetViewModel();
        BeanUtils.copyProperties(goodsSetPO, goodsSetViewModel);

        return goodsSetViewModel;
    }
}
